<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<a4j:form id="form_addLocation">
	<h:panelGrid columns="2">
		<h:outputText value="#{msg.input_adresse}" />
		<h:inputText id="input_adresse" value="#{adresseBean.adresse}"
			required="true" requiredMessage="#{msg.input_adresse_required}"
			maxlength="255" />

		<h:outputText value="#{msg.input_cp}" />
		<h:inputText id="input_cp" value="#{adresseBean.cp}" required="true"
			requiredMessage="#{msg.input_cp_required}" maxlength="10"
			converterMessage="#{msg.error_cpmalformed}">
			<f:validator validatorId="cpValidation" />
		</h:inputText>

		<h:outputText value="#{msg.input_ville}" />
		<h:inputText id="input_ville" value="#{adresseBean.ville}"
			required="true" requiredMessage="#{msg.input_ville_required}"
			maxlength="20" />

		<h:outputText value="#{msg.input_telephone}" />
		<h:inputText id="input_telephone"
			value="#{adresseBean.telephone}" required="true"
			requiredMessage="#{msg.input_telephone_required}" maxlength="10"
			size="10" converterMessage="#{msg.error_telephonemalformed}">
			<f:validator validatorId="telephoneValidation" />
		</h:inputText>
		<h:commandLink value="Ajouter"
			action="#{adresseBean.chooseAsNewLocation}" />
	</h:panelGrid>
</a4j:form>
